Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  "option": {
    "body": "custom option",
    "position": 4,
    "correct_answer": true
  }
}

Success response body

{
  "id": 2,
  "body": "custom option",
  "correct_answer": true
}

Params

Param name Description
question_id
required

Validations:

  • Must be a Integer

option
required

Validations:

  • Must be a Hash

option[body]
required

Validations:

  • Must be a String

option[position]
required

Validations:

  • Must be a Integer

option[correct_answer]
required

Validations:

  • Must be one of: true, false, 1, 0.